<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /**
         * Promise.reject()
         * 
         * 一定得到一个失败的Promise 
         * 
         * 参数就是失败Promise的结果值
         * 
         */

        let p1 = Promise.reject('err');

        let p2 = Promise.reject(new Promise((resolve, reject)=>{
            reject('p2');
        }))

        let p3 = Promise.reject(new Promise((resolve, reject)=>{
            resolve('p3');
        }))

        console.log(p1,p2,p3);
    </script>
</body>
</html>